package cn.weforward.task.weforward.view;

import cn.weforward.protocol.doc.annotation.DocAttribute;
import cn.weforward.protocol.doc.annotation.DocObject;
import cn.weforward.task.Tag;

@DocObject(description = "标签视图")
public class TagView {
	protected Tag m_Tag;
	
	public TagView(Tag tag) {
		m_Tag = tag;
	}

	public static TagView valueOf(Tag tag) {
		return null == tag?null:new TagView(tag);
	}
	
	@DocAttribute(description = "标签id")
	public String getId() {
		return m_Tag.getId().getOrdinal();//取得序列号
	}
	
	@DocAttribute(description = "标签名称")
	public String getName() {
		return m_Tag.getName();
	}
	
	@DocAttribute(description = "标签状态")
	public int getState() {
		return m_Tag.getState().id;
	}
	
	@DocAttribute(description = "标签状态描述")
	public String getStateDesc() {
		return m_Tag.getState().getName();
	}
}
